<%@ Page Language="C#" MasterPageFile="~/MP/Classic.master" AutoEventWireup="true" Inherits="ConfigCusto_EditView" Codebehind="EditView.aspx.cs" RoleHint="Administrator" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageContainer" runat="Server">
    <h1>
        View configuration</h1>
    <table>
        <tr>
            <td colspan="3">
                <asp:GridView ID="ViewFieldsGrid" runat="server" AutoGenerateColumns="False" OnRowDeleting="ViewFieldsGrid_RowDeleting"
                    Width="100%">
                    <Columns>
                        <asp:BoundField DataField="Key" HeaderText="Label">
                            <HeaderStyle Width="155px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Value" HeaderText="Field name">
                            <HeaderStyle Width="155px" />
                        </asp:BoundField>
                        <asp:CommandField DeleteText="Remove" ShowDeleteButton="True" />
                    </Columns>
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td>
                <asp:TextBox ID="LabelTextBox" runat="server" Width="150px"></asp:TextBox>&nbsp;
                <asp:RequiredFieldValidator ID="LabelRequired" runat="server" ErrorMessage="Please enter a label for the field"
                    ControlToValidate="LabelTextBox">*</asp:RequiredFieldValidator>
            </td>
            <td>
                <asp:DropDownList ID="FieldDropDown" runat="server" Width="150px" DataTextField="Name"
                    DataValueField="Name">
                </asp:DropDownList>
            </td>
            <td>
                <asp:Button ID="AddButton" runat="server" Text="Add" OnClick="AddButton_Click" Width="50px" /></td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button ID="SaveButton" runat="server" Text="Save configuration" OnClick="SaveButton_Click" CausesValidation="False" /></td>
            <td>
            </td>
            <td>
            </td>
        </tr>
    </table>
    <asp:ValidationSummary ID="ValidationSummary" runat="server" />
</asp:Content>
